#pragma once


class CRectSelectUI;


class CSeatBox : public CVerticalLayoutUI
{
public:
	CSeatBox(const CSeatBox& );
	CSeatBox(CPaintManagerUI& pp, CRectSelectUI* pRectSelect);
	~CSeatBox();

	void InitParam();

public:
	void DoInit();
	void DoEvent(TEventUI& event);

public:
	bool GetChck();
	void SetCheck(bool bStatus);

	bool GetDragabel();
	void SetDragabel(bool bStatus);

	void SetPositionInfo(DWORD dwRow, DWORD dwCol, LONG lLeft, LONG lTop);

private:
	void MoveSelecetedSeatIcon(SIZE);
	bool KuangXuangDrag(SIZE);
	void SetSeatIconSelectedStatusFalse();

	

private:
	CCheckBoxUI* m_pCheckBox;

	CHorizontalLayoutUI* m_pHLLaternPannel;
	CVerticalLayoutUI* m_pVLSeatMenu;

	CRectSelectUI* m_pSeatIconRectSelectContainerUI;

private:
	int m_iRow;
	int m_iCol;
	int m_iLeft;
	int m_iTop;
	int m_iLeftTemp = 0;
	int m_iTopTemp = 0;
	int m_iWidthLimitConfine = 0;
	int m_iHeightLimitConfine = 0;

	bool m_bIsForbident;
	bool m_bIsDragable;
	SIZE m_SIZEFixFluctuation;

private:
	UINT m_uButtonState;
	POINT ptLastMouse;
	RECT m_rcNewPos;
	bool m_bImmMode;
	POINT m_ptLastMouse;
	CPaintManagerUI& m_ParentPaintManager;

};

